
import Request from '../util/request'

export default class Product extends Request {

  getSet(data) {
    return this.request({
      url: '/h5/product/set',
      data
    })
  }

  // 分类 页面
  categoryPage(data) {
    return this.request({
      url: '/h5/uni/category/category',
      data
    })
  }

  // 一级分类产品
  getOneProduct(data) {
    return this.request({
      url: '/h5/category/menu-product',
      data
    })
  }

  // 获取产品[二级分类的]
  getTwoProduct(data) {
    return this.request({
      url: '/h5/uni/category/product-by-menu',
      data
    })
  }

  // 获取二级分类
  getSecond(data) {
    return this.request({
      url: '/h5/uni/category/second-by-first',
      data
    })
  }

  // vip
  getVip(data) {
    return this.request({
      url: '/h5/uni/vip/vip',
      data
    })
  }

  /*-- product -------------------------------------------*/

  detail(data) {
    return this.request({
      url: '/h5/product/detail',
      data
    })
  }

  like(data) {
    return this.request({
      url: '/h5/product/like',
      data
    })
  }

  area(data) {
    return this.request({
      url: '/h5/area/list',
      data
    })
  }

  category(data) {
    return this.request({
      url: '/h5/category/product-by-category',
      data
    })
  }

  productList(data) {
    return this.request({
      url: '/h5/product/list',
      data
    })
  }

  attrList(data) {
    return this.request({
      url: '/h5/product/attr',
      data
    })
  }

  brandView(data) {
    return this.request({
      url: '/h5/brand/view',
      data
    })
  }

  brandList(data) {
    return this.request({
      url: '/h5/brand/list',
      data
    })
  }

  shopView(data) {
    return this.request({
      url: '/h5/brand/shop-view',
      data
    })
  }

  shopList(data) {
    return this.request({
      url: '/h5/brand/shop-list',
      data
    })
  }

  detailRecommend(data) {
    return this.request({
      url: '/h5/product/detail-recommend',
      data
    })
  }
}
